package spring.controller;

import spring.component.MyAutowired;
import spring.component.MyComponent;
import spring.component.MyController;
import spring.component.MyMapper;
import spring.service.Myservice;

/**
 * User  yyl
 * Description: mySpring
 * Created by yaoyonglong on 2018/11/1 15:09
 */
@MyComponent(scope = "singleton")
@MyController(url = "/url")
public class MyWeb {

    @MyAutowired
    private Myservice myservice;

    @MyMapper(url = "/url", method = "GET")
    public String getUrl() {
        return myservice.Sell();
    }

    @MyMapper(url = "/get", method = "GET")
    public String get() {
        return "This is the way in MyWeb";
    }
}
